home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
271_02
/
smlibtc.doc
< prev
next >
Wrap
Text File
|
1987-08-18
|
45KB
|
1,255 lines
==========================
= STEVE'S LIBRARY =
= for Turbo C =
= - by - =
= Steven E. Margison =
= Version 1.30 =
==========================
Functions and Documentation Copyright 1987
by Steven E. Margison -- All Rights Reserved
ISBN 0-944267-05-X
--------- TABLE OF CONTENTS ---------
Introduction ................................. 1
The Documentation ............................ 1
Installation ................................. 2
Linking ...................................... 3
Real Time Interrupt Handler .................. 4
Video Functions .............................. 5
A. Introduction .......................... 5
B. Initialization ........................ 5
C. De-Initialization ..................... 6
D. Cursor and Character Placement ........ 6
E. Writing Characters and Attributes ..... 7
F. Miscellaneous Operations .............. 7
G. Video Page Switching .................. 8
H. Reading from Video Memory ............. 9
Utilities ..... .............................. 10
Shareware .................................... 15
Warranty ..................................... 16
Registration Form ............................ --
Steve's C Function Library for Turbo C
I. INTRODUCTION
The heart of the C language is its library. Each
compiler has its own library of functions, which is complete
only to the degree that the compiler author wishes to make it.
The Turbo C Compiler is an excellent product, and comes with a
very extensive function library which has all the usual
"standard" functions, plus many DOS functions as well. However,
the more functions a programmer has at his disposal, the shorter
the time from idea to complete program. That's where "Steve's
Library" comes in. At over 100 functions my library greatly
enhances program development with Turbo C.
"Steve's Turbo-C Library" is the third library I have
produced, the other two being for the Datalight C compiler, and
the Lattice C compiler. Many of the functions in this library
may also be found in the other two libraries as well. A
significant exception is the direct video functions. Datalight
C has an excellent (though incomplete) set of functions aimed at
providing direct access to screen memory. Turbo-C does not have
these functions, however, and I think the omission is a serious
flaw in any MS-DOS compiler. I have corrected that situation in
my Turbo-C library by adding an entire package of direct video
access functions, supporting standard IBM-type video boards and
modes.
II. THE DOCUMENTATION
The documentation for the library is contained in a
number of .DOC files, which describe each function. When
printed, these pages may be placed in a standard three-ring
binder. A utility program, PMAN.COM is provided to generate the
entire set of documents. PMAN requires the file LISTALL, which
may be edited to eliminate printing of certain files if desired.
(PMAN is copyrighted, but placed in the public domain.)
To print the DOC files, you must be in a directory (or
on a floppy) containing PMAN, LISTALL, and all the DOC files.
Just type "PMAN" at your system prompt and the files will be
printed to PRN:.
This documentation is not intended to be a complete
course on writing in "C", or on using the Turbo-C compiler. It
is assumed that if you have this library, you already have
Turbo-C and have read Borland's fine manual.
Steve's Library for Turbo C Page 1
III. INSTALLATION
"Steve's Turbo-C Library" is distributed as five library
files for each type of memory model. (Only the full registration
with source has all five libraries.) The filenames are:
SMTCS.LIB Small Memory Model
SMTCC.LIB Compact Memory Model
SMTCM.LIB Medium Memory Model
SMTCH.LIB Huge Memory Model
SMTCL.LIB Large Memory Model
For the remainder of this manual the libraries will be referred
to as SMTCx.LIB.
A typical hard disk installation of Turbo-C will consist of
several directories, one of which will contain all the "include"
files (those with ".H" extensions) and one with the library
files (those with ".LIB" extensions). All files in "Steve's
Library" with a ".H" extension should be placed in the directory
with the Turbo-C ".H" files. Similarly, all "Steve's Library"
files with a ".LIB" extension should be placed with the Turbo-C
".LIB" files. The documentation and source files from "Steve's
Library" do not need to be on the hard disk, as they will only
be used to print the documentation or modify the function
source. They are not used in the direct creation of a program
under Turbo-C. The executable utilities (*.EXE) files supplied
with "Steve's Library" may be optionally placed in any directory
specified in your PATH environment. These programs are all
examples of function usage and C programming, and do not
directly relate to program development for Turbo-C. However,
they are useful and should be placed on your system for access.
The files with "Steve's Library" with an extension of
".SEM" or ".MAC" are required only for re-assembling the
assembly language modules from this library. They do not need
to be placed on your hard disk unless you plan to re-assemble
any ".ASM" source code files.
Steve's Library for Turbo C Page 2
IV. LINKING
The SMTCx.LIB library must be linked with any other
libraries whenever a function is used in your program. Some
programs may not use SMTCx.LIB functions, and therefore the
linking of the library may be eliminated to save time. In
addition, if you have other third party libraries, be sure to
include them after SMTCx.LIB.
There are several methods to invoke the SMTCx.LIBs when
linking under Turbo C. Refer to the Turbo C manual, chapter 3
(User's Guide) for information on using the libraries from
within the TC programming environment. If you use Borland's
"MAKE" utility with "TLINK", then include a link line similar to
this:
libs = \btc\lib\smtcs+\btc\lib\cs
program: program